<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>

    // promise实例的状态产生改变 有什么意义?

    /*
        var p = new Promise((resolve, reject)=>{
            setTimeout(()=>{
                resolve()
            },2000)
        })

        //p的状态产生改变时!!!  then两个回调中的一个是不是要被调用
        p.then(()=>{console.log("1")},()=>{console.log("2")})
    */

    var p = new Promise((resolve, reject)=>{
         resolve()
    })

    p.then(()=>{console.log("1")},()=>{console.log("2")})

    console.log(3)

</script>
</html>